<?php
$sql="
CREATE TABLE IF NOT EXISTS `ims_bh_zq_address` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `name` varchar(30) NOT NULL,
  `phone` varchar(30) NOT NULL,
  `address` text NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_name` varchar(255) NOT NULL,
  `category_describe` varchar(255) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `states` tinyint(4) NOT NULL DEFAULT '1',
  `is_delete` tinyint(4) NOT NULL DEFAULT '1',
  `sort` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_code` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` char(32) NOT NULL,
  `member_id` int(11) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=232 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `key` varchar(50) NOT NULL,
  `value` text NOT NULL,
  `uniacid` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `key` (`key`,`uniacid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_crontab_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `day_id` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  `uniacid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_currency_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `type` tinyint(4) NOT NULL,
  `currency` decimal(10,2) NOT NULL,
  `same_day` int(11) NOT NULL,
  `remarks` varchar(500) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1046 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_day` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `same_day` int(11) NOT NULL,
  `clock` int(255) NOT NULL DEFAULT '0',
  `currency` decimal(10,2) NOT NULL DEFAULT '0.00',
  `money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `is_fictitious` tinyint(4) NOT NULL DEFAULT '1',
  `uniacid` int(11) NOT NULL,
  `updated` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `same_day` (`same_day`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1036 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL,
  `type` int(11) NOT NULL DEFAULT '1',
  `is_under_line` tinyint(4) NOT NULL DEFAULT '1',
  `original_price` decimal(10,2) NOT NULL,
  `goods_name` varchar(255) NOT NULL,
  `share_title` varchar(300) NOT NULL,
  `exchange_type` tinyint(4) NOT NULL DEFAULT '1',
  `money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `exchange_number` int(11) NOT NULL,
  `cover_image` varchar(255) NOT NULL,
  `image` text NOT NULL,
  `is_free` tinyint(4) NOT NULL DEFAULT '1',
  `free` decimal(10,2) NOT NULL,
  `inventory_type` tinyint(4) NOT NULL,
  `inventory` int(11) NOT NULL DEFAULT '0',
  `introduce` text NOT NULL,
  `allow_type` tinyint(4) NOT NULL DEFAULT '1',
  `allow_number` int(11) NOT NULL DEFAULT '0',
  `uniacid` int(11) NOT NULL,
  `status` int(11) NOT NULL DEFAULT '1',
  `sigin` int(11) NOT NULL DEFAULT '0',
  `is_delete` tinyint(4) NOT NULL DEFAULT '1',
  `sort` int(11) NOT NULL DEFAULT '0',
  `bag_money` decimal(10,2) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `category_id` (`category_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `downline_id` int(11) NOT NULL,
  `level` tinyint(4) NOT NULL DEFAULT '1',
  `uniacid` int(11) NOT NULL,
  `updated` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `md` (`member_id`,`downline_id`) USING BTREE,
  KEY `downline_id` (`downline_id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_member` (
  `id` int(8) unsigned NOT NULL AUTO_INCREMENT,
  `unionid` varchar(50) NOT NULL,
  `openid` varchar(50) NOT NULL,
  `nickname` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
  `head` varchar(200) NOT NULL COMMENT '用户头像路径',
  `gender` tinyint(1) NOT NULL COMMENT '用户性别 0：未知  1：男  2：女',
  `province` varchar(50) NOT NULL COMMENT '省份',
  `sex` tinyint(4) NOT NULL DEFAULT '0',
  `city` varchar(50) NOT NULL,
  `country` varchar(50) NOT NULL,
  `money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `click` int(11) NOT NULL DEFAULT '0',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `parent_id` int(11) NOT NULL DEFAULT '0',
  `cash` int(11) NOT NULL,
  `remind` int(11) NOT NULL DEFAULT '0',
  `currency` decimal(10,2) NOT NULL DEFAULT '0.00',
  `is_fictitious` tinyint(4) NOT NULL DEFAULT '1',
  `uniacid` int(11) NOT NULL,
  `qq` varchar(20) NOT NULL,
  `payment_code` varchar(255) NOT NULL,
  `is_block` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1:未拉黑2:已拉黑',
  `abnormal` int(11) NOT NULL DEFAULT '0',
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `parent_id` (`parent_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_member_clock` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `same_day` int(11) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ms` (`member_id`,`same_day`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_money_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `money` decimal(10,2) NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1',
  `after_money` decimal(10,2) NOT NULL,
  `remarks` varchar(255) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=159 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_multiple` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) NOT NULL,
  `secret` varchar(255) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_navigation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL,
  `position` varchar(50) NOT NULL,
  `path` varchar(255) NOT NULL,
  `selection_image` varchar(255) NOT NULL,
  `unchecked_images` varchar(255) NOT NULL,
  `selection_color` varchar(20) NOT NULL,
  `unchecked_color` varchar(20) NOT NULL,
  `sort` int(11) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `position` (`position`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_new` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `subtitle` varchar(255) NOT NULL,
  `cover_image` varchar(255) NOT NULL,
  `author` varchar(255) NOT NULL,
  `author_image` varchar(255) NOT NULL,
  `browse` int(11) NOT NULL DEFAULT '0',
  `content` text NOT NULL,
  `state` tinyint(4) NOT NULL DEFAULT '1',
  `sort` int(11) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `goods_id` int(11) NOT NULL,
  `member_id` int(11) NOT NULL,
  `exchange_type` tinyint(11) NOT NULL DEFAULT '1',
  `exchange_number` int(11) NOT NULL DEFAULT '0',
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `type` tinyint(4) NOT NULL DEFAULT '1',
  `bag_money` decimal(10,2) NOT NULL,
  `money` decimal(10,2) NOT NULL,
  `free` decimal(10,2) NOT NULL,
  `courier_name` varchar(255) NOT NULL,
  `courier_number` varchar(100) NOT NULL,
  `address` varchar(1000) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `delivery_time` int(11) NOT NULL,
  `complete_time` int(11) NOT NULL,
  `fictitious` varchar(255) NOT NULL,
  `name` varchar(50) NOT NULL,
  `phone` varchar(50) NOT NULL,
  `is_under_line` tinyint(4) NOT NULL DEFAULT '1',
  `is_pay` tinyint(4) NOT NULL DEFAULT '1',
  `created` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `goods_id` (`goods_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_pay_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `trade_no` char(50) NOT NULL,
  `transaction_id` char(32) NOT NULL,
  `pay_time` int(11) NOT NULL,
  `money` decimal(10,2) NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1',
  `uniacid` int(11) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `relation_id` int(11) NOT NULL,
  `crested` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_program` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `icon` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `appid` varchar(100) NOT NULL,
  `path` varchar(255) NOT NULL,
  `position` tinyint(4) NOT NULL DEFAULT '1',
  `type` tinyint(4) NOT NULL DEFAULT '1',
  `sort` int(11) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_roll` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `image` varchar(255) NOT NULL,
  `content` varchar(255) DEFAULT NULL,
  `uniacid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_rule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `content` text NOT NULL,
  `position` tinyint(4) NOT NULL DEFAULT '1',
  `sort` int(11) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_subsection` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `start_time` tinyint(4) NOT NULL,
  `end_time` tinyint(4) NOT NULL,
  `currency` decimal(10,2) NOT NULL DEFAULT '0.00',
  `describe` varchar(255) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_system_day` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `same_day` int(11) NOT NULL,
  `currency` decimal(10,2) NOT NULL DEFAULT '0.00',
  `money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `fictitious_money` decimal(10,2) NOT NULL,
  `fictitious_currency` decimal(10,2) NOT NULL,
  `click_num` int(11) NOT NULL DEFAULT '0',
  `total_number` int(11) NOT NULL DEFAULT '0',
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `su` (`same_day`,`uniacid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=156 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_task` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` tinyint(4) NOT NULL DEFAULT '1',
  `number` int(11) NOT NULL DEFAULT '1',
  `title` varchar(255) NOT NULL,
  `currency` decimal(10,2) NOT NULL DEFAULT '0.00',
  `appid` varchar(20) NOT NULL,
  `path` varchar(255) NOT NULL,
  `sort` int(11) NOT NULL,
  `position` tinyint(4) NOT NULL DEFAULT '1',
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_task_member` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `task_id` int(11) NOT NULL,
  `number` int(11) NOT NULL DEFAULT '1',
  `uniacid` int(11) NOT NULL,
  `same_day` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `mt` (`member_id`,`task_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_time_slot` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) NOT NULL,
  `start` tinyint(4) NOT NULL DEFAULT '0',
  `end` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `se` (`start`,`end`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_token` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `token` char(32) NOT NULL,
  `member_id` int(11) NOT NULL,
  `session_key` varchar(255) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `token` (`token`,`uniacid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=218 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_withdrawals` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) NOT NULL,
  `money` decimal(10,2) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `success_time` int(11) NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1',
  `payment_code` varchar(150) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_bh_zq_withdrawals_condition` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `number` int(11) NOT NULL DEFAULT '1',
  `click_day` int(11) NOT NULL DEFAULT '1',
  `share_num` int(11) NOT NULL DEFAULT '0',
  `money` decimal(10,2) NOT NULL,
  `uniacid` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `number` (`number`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

";
pdo_run($sql);
if(!pdo_fieldexists("bh_zq_address", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_address")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_address", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_address")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_address", "name")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_address")." ADD `name` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_address", "phone")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_address")." ADD `phone` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_address", "address")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_address")." ADD `address` text NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_address", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_address")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_address", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_address")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_category", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_category", "category_name")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_category")." ADD `category_name` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_category", "category_describe")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_category")." ADD `category_describe` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_category", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_category")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_category", "states")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_category")." ADD `states` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_category", "is_delete")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_category")." ADD `is_delete` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_category", "sort")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_category")." ADD `sort` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_code", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_code")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_code", "code")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_code")." ADD `code` char(32) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_code", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_code")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_code", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_code")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_code", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_code")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_config", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_config")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_config", "key")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_config")." ADD `key` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_config", "value")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_config")." ADD `value` text NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_config", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_config")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_crontab_data", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_crontab_data")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_crontab_data", "day_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_crontab_data")." ADD `day_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_crontab_data", "time")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_crontab_data")." ADD `time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_crontab_data", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_crontab_data")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_currency_log", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_currency_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_currency_log", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_currency_log")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_currency_log", "type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_currency_log")." ADD `type` tinyint(4) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_currency_log", "currency")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_currency_log")." ADD `currency` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_currency_log", "same_day")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_currency_log")." ADD `same_day` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_currency_log", "remarks")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_currency_log")." ADD `remarks` varchar(500) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_currency_log", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_currency_log")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_currency_log", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_currency_log")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_day", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_day")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_day", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_day")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_day", "same_day")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_day")." ADD `same_day` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_day", "clock")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_day")." ADD `clock` int(255) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_day", "currency")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_day")." ADD `currency` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("bh_zq_day", "money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_day")." ADD `money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("bh_zq_day", "status")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_day")." ADD `status` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_day", "is_fictitious")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_day")." ADD `is_fictitious` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_day", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_day")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_day", "updated")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_day")." ADD `updated` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_day", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_day")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_goods", "category_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `category_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `type` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_goods", "is_under_line")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `is_under_line` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_goods", "original_price")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `original_price` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "goods_name")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `goods_name` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "share_title")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `share_title` varchar(300) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "exchange_type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `exchange_type` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_goods", "money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("bh_zq_goods", "exchange_number")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `exchange_number` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "cover_image")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `cover_image` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "image")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `image` text NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "is_free")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `is_free` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_goods", "free")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `free` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "inventory_type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `inventory_type` tinyint(4) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "inventory")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `inventory` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_goods", "introduce")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `introduce` text NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "allow_type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `allow_type` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_goods", "allow_number")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `allow_number` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_goods", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "status")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `status` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_goods", "sigin")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `sigin` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_goods", "is_delete")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `is_delete` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_goods", "sort")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `sort` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_goods", "bag_money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `bag_money` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_goods", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_goods")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_group", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_group")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_group", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_group")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_group", "downline_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_group")." ADD `downline_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_group", "level")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_group")." ADD `level` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_group", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_group")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_group", "updated")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_group")." ADD `updated` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_group", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_group")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `id` int(8) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_member", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `unionid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "openid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `openid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `nickname` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "head")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `head` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "gender")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `gender` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "province")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `province` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "sex")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `sex` tinyint(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_member", "city")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `city` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "country")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `country` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("bh_zq_member", "click")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `click` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_member", "status")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `status` tinyint(1) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_member", "parent_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `parent_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_member", "cash")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `cash` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "remind")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `remind` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_member", "currency")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `currency` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("bh_zq_member", "is_fictitious")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `is_fictitious` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_member", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "qq")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `qq` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "payment_code")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `payment_code` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member", "is_block")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `is_block` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_member", "abnormal")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `abnormal` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_member", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member_clock", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member_clock")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_member_clock", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member_clock")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member_clock", "same_day")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member_clock")." ADD `same_day` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member_clock", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member_clock")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_member_clock", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_member_clock")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_money_log", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_money_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_money_log", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_money_log")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_money_log", "money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_money_log")." ADD `money` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_money_log", "type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_money_log")." ADD `type` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_money_log", "after_money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_money_log")." ADD `after_money` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_money_log", "remarks")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_money_log")." ADD `remarks` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_money_log", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_money_log")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_money_log", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_money_log")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_multiple", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_multiple")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_multiple", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_multiple")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_multiple", "secret")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_multiple")." ADD `secret` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_multiple", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_multiple")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_navigation", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_navigation")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_navigation", "name")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_navigation")." ADD `name` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_navigation", "position")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_navigation")." ADD `position` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_navigation", "path")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_navigation")." ADD `path` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_navigation", "selection_image")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_navigation")." ADD `selection_image` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_navigation", "unchecked_images")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_navigation")." ADD `unchecked_images` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_navigation", "selection_color")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_navigation")." ADD `selection_color` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_navigation", "unchecked_color")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_navigation")." ADD `unchecked_color` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_navigation", "sort")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_navigation")." ADD `sort` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_navigation", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_navigation")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_navigation", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_navigation")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_new", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_new", "title")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_new", "subtitle")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `subtitle` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_new", "cover_image")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `cover_image` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_new", "author")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `author` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_new", "author_image")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `author_image` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_new", "browse")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `browse` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_new", "content")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `content` text NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_new", "state")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `state` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_new", "sort")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `sort` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_new", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_new", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_new")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_order", "goods_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `goods_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "exchange_type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `exchange_type` tinyint(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_order", "exchange_number")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `exchange_number` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_order", "status")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `status` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_order", "type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `type` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_order", "bag_money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `bag_money` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `money` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "free")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `free` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "courier_name")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `courier_name` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "courier_number")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `courier_number` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "address")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `address` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "delivery_time")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `delivery_time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "complete_time")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `complete_time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "fictitious")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `fictitious` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "name")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `name` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "phone")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `phone` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_order", "is_under_line")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `is_under_line` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_order", "is_pay")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `is_pay` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_order", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_order")." ADD `created` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_pay_order", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_pay_order")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_pay_order", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_pay_order")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_pay_order", "trade_no")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_pay_order")." ADD `trade_no` char(50) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_pay_order", "transaction_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_pay_order")." ADD `transaction_id` char(32) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_pay_order", "pay_time")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_pay_order")." ADD `pay_time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_pay_order", "money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_pay_order")." ADD `money` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_pay_order", "type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_pay_order")." ADD `type` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_pay_order", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_pay_order")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_pay_order", "status")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_pay_order")." ADD `status` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_pay_order", "relation_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_pay_order")." ADD `relation_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_pay_order", "crested")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_pay_order")." ADD `crested` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_program", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_program")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_program", "icon")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_program")." ADD `icon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_program", "name")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_program")." ADD `name` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_program", "appid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_program")." ADD `appid` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_program", "path")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_program")." ADD `path` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_program", "position")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_program")." ADD `position` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_program", "type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_program")." ADD `type` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_program", "sort")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_program")." ADD `sort` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_program", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_program")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_program", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_program")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_roll", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_roll")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_roll", "image")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_roll")." ADD `image` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_roll", "content")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_roll")." ADD `content` varchar(255);");
}
if(!pdo_fieldexists("bh_zq_roll", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_roll")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_rule", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_rule")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_rule", "content")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_rule")." ADD `content` text NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_rule", "position")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_rule")." ADD `position` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_rule", "sort")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_rule")." ADD `sort` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_rule", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_rule")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_rule", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_rule")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_subsection", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_subsection")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_subsection", "start_time")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_subsection")." ADD `start_time` tinyint(4) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_subsection", "end_time")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_subsection")." ADD `end_time` tinyint(4) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_subsection", "currency")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_subsection")." ADD `currency` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("bh_zq_subsection", "describe")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_subsection")." ADD `describe` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_subsection", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_subsection")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_subsection", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_subsection")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_system_day", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_system_day")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_system_day", "same_day")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_system_day")." ADD `same_day` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_system_day", "currency")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_system_day")." ADD `currency` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("bh_zq_system_day", "money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_system_day")." ADD `money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("bh_zq_system_day", "fictitious_money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_system_day")." ADD `fictitious_money` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_system_day", "fictitious_currency")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_system_day")." ADD `fictitious_currency` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_system_day", "click_num")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_system_day")." ADD `click_num` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_system_day", "total_number")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_system_day")." ADD `total_number` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_system_day", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_system_day")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_system_day", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_system_day")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_task", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_task", "type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task")." ADD `type` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_task", "number")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task")." ADD `number` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_task", "title")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task")." ADD `title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_task", "currency")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task")." ADD `currency` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("bh_zq_task", "appid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task")." ADD `appid` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_task", "path")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task")." ADD `path` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_task", "sort")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task")." ADD `sort` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_task", "position")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task")." ADD `position` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_task", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_task", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_task_member", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task_member")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_task_member", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task_member")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_task_member", "task_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task_member")." ADD `task_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_task_member", "number")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task_member")." ADD `number` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_task_member", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task_member")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_task_member", "same_day")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task_member")." ADD `same_day` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_task_member", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_task_member")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_time_slot", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_time_slot")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_time_slot", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_time_slot")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_time_slot", "start")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_time_slot")." ADD `start` tinyint(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_time_slot", "end")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_time_slot")." ADD `end` tinyint(4) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_token", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_token")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_token", "token")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_token")." ADD `token` char(32) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_token", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_token")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_token", "session_key")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_token")." ADD `session_key` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_token", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_token")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_token", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_token")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_withdrawals", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_withdrawals", "member_id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals")." ADD `member_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_withdrawals", "money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals")." ADD `money` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_withdrawals", "status")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals")." ADD `status` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_withdrawals", "success_time")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals")." ADD `success_time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_withdrawals", "type")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals")." ADD `type` tinyint(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_withdrawals", "payment_code")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals")." ADD `payment_code` varchar(150) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_withdrawals", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_withdrawals", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals")." ADD `created` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_withdrawals_condition", "id")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals_condition")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("bh_zq_withdrawals_condition", "number")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals_condition")." ADD `number` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_withdrawals_condition", "click_day")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals_condition")." ADD `click_day` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("bh_zq_withdrawals_condition", "share_num")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals_condition")." ADD `share_num` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("bh_zq_withdrawals_condition", "money")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals_condition")." ADD `money` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_withdrawals_condition", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals_condition")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("bh_zq_withdrawals_condition", "created")) {
 pdo_query("ALTER TABLE ".tablename("bh_zq_withdrawals_condition")." ADD `created` int(11) NOT NULL;");
}
